package com.ruoyi.project.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 进件记录对象 siyu_query
 */
@Data
@Accessors(chain = true)
public class SiyuQuery extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 单号
     */
    @Excel(name = "进件单号")
    private Integer queryId;

    private String sourceType;

    private String authCode;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private Integer userId;

    /**
     * 姓名
     */
    @Excel(name = "姓名")
    private String name;

    /**
     * 身份证
     */
    @Excel(name = "身份证")
    private String cardNo;

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    private String tel;

    /**
     * 更多关键字
     */
    @Excel(name = "更多关键字")
    private String moreKeyword;

    /**
     * 概要结果
     */
    private String queryResult;

    /**
     * 具体结果
     */
    private String queryInfo;

    private Integer baseInfoId;

    private Date baseTime;

    /**
     * 运营商
     */
    private String yysInfo;

    /**
     * 运营商报告
     */
    private String yysReport;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date yysTime;

    /**
     * 司法直通车
     */
    private String sfssInfo;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sfssTime;

    /**
     * 雷达探查（超详版）
     */
    private String zfxwInfo;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date zfxwTime;

    /**
     * 探针A
     */
    private String lyzsInfo;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lyzsTime;

    /**
     * 全景雷达v4
     */
    private String zhzzv4Info;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date zhzzv4Time;

    /**
     * 探针C
     */
    private String xytcInfo;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date xytcTime;

    /**
     * 全景档案
     */
    private String qjzsInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date qjzsTime;

    /**
     * 良人检测
     */
    private String blxwInfo;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date blxwTime;

    /**
     * 逾期行为(TC)
     */
    private String dyxwInfo;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dyxwTime;

    /**
     * 个人消费画像
     */
    private String xzxxInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date xzxxTime;

    /**
     * 特殊关注名单
     */
    private String chdjInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date chdjTime;

    /**
     * 黑名单等级
     */
    private String chInfo;

    /**
     * $column.columnComment
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date chTime;

    private String chaoduoInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date chaoduoTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String tianlanInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date tianlanTime;


    private String moreInfo;

    private String isThreeElement;

    private String delFlag;

    @TableField(exist = false)
    private Integer id;

    public SiyuQuery() {
    }

    public SiyuQuery(String queryInfo) {
        this.queryInfo = queryInfo;
        this.setCreateTime(new Date());
    }

    public SiyuQuery(Integer queryId, String moreKeyword) {
        this.queryId = queryId;
        this.moreKeyword = moreKeyword;
    }

    public SiyuQuery(Integer queryId, Integer baseInfoId) {
        this.queryId = queryId;
        this.baseInfoId = baseInfoId;
    }

    public SiyuQuery(SiyuQuery siyuQuery, String data) {
        Integer id = siyuQuery.getId();
        this.queryId = siyuQuery.getQueryId();
        if (id == 3) {
            this.lyzsInfo = data;
            this.lyzsTime = DateUtils.getNowDate();
        } else if (id == 4) {
            this.zhzzv4Info = data;
            this.zhzzv4Time = DateUtils.getNowDate();
        } else if (id == 5) {
            this.xytcInfo = data;
            this.xytcTime = DateUtils.getNowDate();
        } else if (id == 6) {
            this.qjzsInfo = data;
            this.qjzsTime = DateUtils.getNowDate();
        } else if (id == 7) {
            this.chaoduoInfo = data;
            this.chaoduoTime = DateUtils.getNowDate();
        } else if (id == 8) {
            this.tianlanInfo = data;
            this.tianlanTime = DateUtils.getNowDate();
        } else if (id == 9) {
            this.sfssInfo = data;
            this.sfssTime = DateUtils.getNowDate();
        } else if (id == 10) {
            this.zfxwInfo = data;
            this.zfxwTime = DateUtils.getNowDate();
        } else if (id == 11) {
            this.blxwInfo = data;
            this.blxwTime = DateUtils.getNowDate();
        } else if (id == 12) {
            this.dyxwInfo = data;
            this.dyxwTime = DateUtils.getNowDate();
        } else if (id == 13) {
            this.xzxxInfo = data;
            this.xzxxTime = DateUtils.getNowDate();
        } else if (id == 14) {
            this.chdjInfo = data;
            this.chdjTime = DateUtils.getNowDate();
        } else if (id == 15) {
            this.chInfo = data;
            this.chTime = DateUtils.getNowDate();
        }
    }

}
